{extend name="layout" /}
{block name="css"}
<!-- ================== BEGIN PAGE LEVEL STYLE ================== -->
<link href="artisan_plugins/DataTables/css/data-table.css" rel="stylesheet"/>
<link href="artisan_plugins/switchery/switchery.min.css" rel="stylesheet"/>
<link href="artisan_plugins/powerange/powerange.min.css" rel="stylesheet"/>
<!-- ================== END PAGE LEVEL STYLE ================== -->
<style type="text/css">
    #data-table_paginate, #data-table_info {display: none;}
    td {font-size: 13px;}
</style>
{/block}

{block name="content"}
<div id="content" class="content">
    <div class="row">
        <div class="col-md-3">
            <div class="panel panel-inverse" data-sortable-id="index-2">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default"
                           data-click="panel-expand"><i class="fa fa-expand"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success"
                           data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning"
                           data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger"
                           data-click="panel-remove"><i class="fa fa-times"></i></a>
                    </div>
                    <h4 class="panel-title">地区信息</h4>
                </div>
                <div class="panel-body">
                    <div class="row select-container">
                        <form class="form-horizontal" role="form">
                            <div class="form-group">
                                <div class="col-sm-10">
                                    <select class="form-control" name="" id="PR">
                                        <option>--请选择--</option>
                                    </select>
                                </div>
                                <label class="col-sm-2 control-label" for="PR"
                                       style="padding-left: 0;text-align: left">省</label>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-10">
                                    <select class="form-control" name="" id="City">
                                        <option>--请选择--</option>
                                    </select>
                                </div>
                                <label class="col-sm-2 control-label" for="City"
                                       style="padding-left: 0;text-align: left">市</label>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-10">
                                    <select class="form-control" name="" id="Town">
                                        <option>--请选择--</option>
                                    </select>
                                </div>
                                <label class="col-sm-2 control-label" for="Town"
                                       style="padding-left: 0;text-align: left">县</label>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-9">

            <div class="panel panel-inverse" data-sortable-id="index-1">
                <div class="panel-heading">
                    <div class="panel-heading-btn">
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default"
                           data-click="panel-expand"><i class="fa fa-expand"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success"
                           data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning"
                           data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                        <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger"
                           data-click="panel-remove"><i class="fa fa-times"></i></a>
                    </div>
                    <h4 class="panel-title">Website Analytics (Last 7 Days)</h4>
                </div>
                <div class="panel-body">
                    <div class="row select-container">
                        <form class="form-horizontal" role="form">
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="Shop">车 间</label>
                                <div class="col-sm-6">
                                    <select class="form-control" name="" id="Shop">

                                    </select>
                                </div>
                                <div class="col-sm-4">
                                    <div class="btn-group">
                                        <button class="btn btn-default">增加</button>
                                        <button class="btn btn-default">编辑</button>
                                        <button class="btn btn-default">删除</button>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="Part">工 段</label>
                                <div class="col-sm-6">
                                    <select class="form-control" name="" id="Part">

                                    </select>
                                </div>
                                <div class="col-sm-4">
                                    <div class="btn-group">
                                        <button class="btn btn-default">增加</button>
                                        <button class="btn btn-default">编辑</button>
                                        <button class="btn btn-default">删除</button>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" for="Room">电气室</label>
                                <div class="col-sm-6">
                                    <select class="form-control" name="" id="Room">

                                    </select>
                                </div>
                                <div class="col-sm-4">
                                    <div class="btn-group">
                                        <button class="btn btn-default">增加</button>
                                        <button class="btn btn-default">编辑</button>
                                        <button class="btn btn-default">删除</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--测点定义窗口start-->
    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="panel-heading-btn">
                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i
                        class="fa fa-expand"></i></a>
                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i
                        class="fa fa-repeat"></i></a>
                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i
                        class="fa fa-minus"></i></a>
                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i
                        class="fa fa-times"></i></a>
            </div>
            <h4 class="panel-title">电气回路消防预警设置</h4>
        </div>
        <div class="panel-body">
            <div class="table-responsive">
                <div class="alert alert-info fade in">
                    <button type="button" class="close" data-dismiss="alert">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    过流报警设置、漏电报警设置、温度报警设置可根据测点信息展示页属性进行对应设置。
                </div>
                <table class="table table-striped table-bordered nowrap" width="100%">
                    <thead>
                    <tr>
                        <td>测点ID</td>
                        <td>回路名称</td>
                        <td>最大额定电流值</td>
                        <!-- <td>漏电报警设置</td> -->
                        <td>最大额定温度值</td>
                        <td>烟雾报警参考值</td>
                        <td>火灾报警温度值</td>
                        <td>近红外图像报警参考值</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    {notempty name="monitor_info"}
                    {foreach $monitor_info as $ms_item}
                    <tr>
                        <td>{$ms_item['monitor_id']}</td>
                        <td>{$ms_item['loop_name']}</td>
                        <td>{$ms_item['over_current']}mA</td>
                        <!-- <td>{$ms_item['reveal_current']}mA</td> -->
                        <td>{$ms_item['cable_temp']}℃</td>
                        <td>{$ms_item['smoke']}</td>
                        <td>{$ms_item['fire']}</td>
                        <td>{$ms_item['near_infrared']}</td>
                        <td>
                            <a href="{:url('Admin/Alarm/updateMonitor',['monitor_id' => $ms_item['monitor_id']])}"><i
                                    class="fa fa-pencil">编辑</i></a> | <a
                                href="{:url('Admin/Alarm/deleteMonitor',['monitor_id' => $ms_item['monitor_id']])}"
                                style="color: red;"><i class="fa fa-trash-o">删除</i></a>
                        </td>
                    </tr>
                    {/foreach}
                    {/notempty}
                    </tbody>
                </table>
                <div class="col-md-9"></div>
                <div class="col-md-3" style="margin:0px;padding: 0px;"><p class="pull-right">
                    {$monitor_info->render()}</p></div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<!-- ================== BEGIN PAGE LEVEL JS ================== -->
<script src="artisan_plugins/DataTables/js/jquery.dataTables.js"></script>
<script src="artisan_plugins/DataTables/js/dataTables.tableTools.js"></script>
<script src="artisan_plugins/switchery/switchery.min.js"></script>
<script src="artisan_plugins/powerange/powerange.min.js"></script>
<script src="artisan_js/apps.min.js"></script>
<!-- ================== END PAGE LEVEL JS ================== -->
<script type="text/javascript">
    $(document).ready(function () {
        TableManageTableTools.init();
    });
</script>
{/block}
